package groovy.runtime.metaclass.com.webobjects.foundation;

import java.util.List;
import com.webobjects.foundation.*;
import groovy.lang.*;

public class NSMutableArrayMetaClass extends DelegatingMetaClass {

	public NSMutableArrayMetaClass(MetaClass delegate) {
		super(delegate);
	}
	
	public Object invokeConstructor(Object[] arguments) {
		if (arguments==null)
			return super.invokeConstructor(arguments);
		if (arguments.length == 1) {
			Object arg = arguments[0];
			if (arg instanceof List) {
				return new NSMutableArray(new NSArray((List)arg, true));
			}
		}
		return super.invokeConstructor(arguments);
	}

}
